﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WaterlevelAbnormalQuery.aspx.cs" Inherits="GroundWater.waterlevel.WaterlevelAbnormalQuery" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="scriptManager" runat="server" />
    <div class="region" style="width: 90%; font-size:9pt;">
        <table style="width: 100%;">
            <tr>
                <td>日期从:</td><td><asp:TextBox runat="server"  id="txtStartDate"   />&nbsp;<img onclick="WdatePicker({el:$dp.$('txtStartDate')})" src="../js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle" /></td>
                <td>到:</td><td><asp:TextBox runat="server"  id="txtEndDate"  />&nbsp;<img onclick="WdatePicker({el:$dp.$('txtEndDate')})" src="../js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle" /></td>
                <td><asp:Button ID="btnQuery" runat="server" Text="查询"  onclick="btnQuery_Click" /></td>
            </tr>
        </table>
    </div>
    
<asp:ObjectDataSource id="odsAbnormal" runat="server" EnablePaging="True" 
     TypeName="GroundWater.BusinessActions.WaterlevelAbnormal" 
     SelectMethod="FetchPaged" SelectCountMethod="FetchRowCount" DeleteMethod="DeleteById"
     SortParameterName="sortExpression">
    <SelectParameters>
    <asp:ControlParameter ControlID="txtStartDate" PropertyName="Text" Name="startDate" />
    <asp:ControlParameter ControlID="txtEndDate" PropertyName="Text" Name="endDate" />
      <%--<asp:Parameter Name="wellCode" Type="String"  />
      <asp:Parameter Name="whereClause" Type="String" />
      <asp:Parameter Name="whereClause" Type="String" />
      <asp:Parameter Name="whereClause" Type="String" />--%>
    </SelectParameters>
    <DeleteParameters>
    <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="False" />
    </DeleteParameters>
</asp:ObjectDataSource>
    
    <div style="width:96%; margin-top:10px;" id="laseWarning" runat="server">
        <p style="font-weight:bold; font-family:Tahoma; margin-bottom:8px; "></p>
        <div class="grid">
            <div class="rounded">
                <div class="top-outer"><div class="top-inner"><div class="top">
                    <h2>异常水位信息</h2>
                </div></div></div>
                <div class="mid-outer"><div class="mid-inner"><div class="mid">     
                
                    <!-- Content Goes Here! -->
                    <asp:UpdatePanel ID="updPanel" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <asp:GridView  ID="gvWarning" runat="server" DataSourceID="odsAbnormal"  SkinID="PagingGridView" DataKeyNames="Id" OnRowDataBound="RowDataBound" EnableViewState="false" >
                                <Columns>
                                    <asp:BoundField  HeaderText="水井名称" DataField="WellName" SortExpression="WellCode" HeaderStyle-CssClass="first" ItemStyle-CssClass="first" />
                                    <asp:BoundField  HeaderText="监测时间" DataField="MonitoringDate"   SortExpression="MonitoringDate"  />
                                    <asp:BoundField  HeaderText="上次水位" DataField="PreviousWaterlevel"   SortExpression="PreviousWaterlevel"    />
                                    <asp:BoundField  HeaderText="本次水位" DataField="CurrentWaterlevel" SortExpression="CurrentWaterlevel"  />
                                    <asp:BoundField  HeaderText="差值" DataField="Difference"     SortExpression="Difference"  />
                                    <asp:BoundField  HeaderText="告警差值" DataField="WarningDifference"    SortExpression="WarningDifference"   />
                                    <asp:BoundField  HeaderText="报告时间" DataField="ExamineDate"     SortExpression="ExamineDate"  />
                                    <asp:BoundField  HeaderText="报告者" DataField="Examiner"    SortExpression="Examiner"   />
                                    <asp:CommandField ShowDeleteButton="true" DeleteText="删除" />
                                </Columns>
                            </asp:GridView>   
                        </ContentTemplate>
                        <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnQuery" />
                        </Triggers>
                    </asp:UpdatePanel>                     
    
                </div></div></div>
            <div class="bottom-outer"><div class="bottom-inner">
            <div class="bottom"></div></div></div>                   
        </div>      
        </div>
    </div>
    
<asp:updateprogress id="updateProgress" runat="server" DynamicLayout="true" DisplayAfter="300">
    <progresstemplate>
        <div id="progressBackgroundFilter"></div>
        <div id="processMessage">正在处理数据，请稍等...<br /><br /><img alt="Loading" src="../images/loading_16.gif" /></div>
    </progresstemplate>
</asp:updateprogress>
    </form>
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
</body>
</html>
